<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>

<%@taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<f:view>	
	<h:panelGrid columns="2" cellpadding="10">
		<h:outputLink value="list.jsf">
			<h:outputText value="Lister" />
		</h:outputLink>
	
		<h:outputLink value="add.jsf">
			<h:outputText value="Ajouter" />
		</h:outputLink>
	</h:panelGrid>
	<h:form>
		<h:panelGrid border="0" columns="3" cellpadding="5">
			<h:outputText value="Title" />
			<h:inputText id="title" value="#{MediaControl.media.title}"
				required="true" requiredMessage="Title obligatoire" />
			<h:message for="Title" />
	
			<h:outputText value="Resume" />
			<h:inputText id="resume" value="#{MediaControl.media.resume}"
				required="true" requiredMessage="Resume obligatoire" />
			<h:message for="resume" />
			<h:outputText />
			<h:commandButton value="Ajouter" action="#{MediaControl.createMedia}" />
		</h:panelGrid>
	</h:form>
</f:view>